<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
</head>
<body>
<table class="table">
    <thead>
    <tr>
        <th scope="col">#</th>
        <th scope="col">商品名称</th>
        <th scope="col">价格</th>
        <th scope="col">库存</th>
        <th scope="col">操作</th>
    </tr>
    </thead>
    <tbody>
    {volist name="data" id="v"}
    <tr>
        <th scope="row">{$v.id}</th>
        <td>{$v.goods_name}</td>
        <td>{$v.price}</td>
        <td>{$v.number}</td>
        <td><a href="{:url('admin/cart/addCart',['id'=>$v.id])}">加入购物车</a></td>
    </tr>
    {/volist}
    </tbody>
</table>
<a href="{:url('admin/cart/show')}">购物车</a>
</body>
</html>